home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: uu4news.netcom.com!zodiac!szh
- From: szh@zcon.com (Syed Zaeem Hosain)
- Subject: Re: What to do when feof() is NOT feof()
- Message-ID: <1996Feb21.065129.10062@zcon.com>
- Sender: szh@zcon.com (Syed Zaeem Hosain)
- Nntp-Posting-Host: zodiac
- Reply-To: szh@zcon.com
- Organization: Z Consulting Group
- References: <4gb7r3$p4k@sun001.spd.dsccc.com>
- Date: Wed, 21 Feb 1996 06:51:29 GMT
-
- In article <4gb7r3$p4k@sun001.spd.dsccc.com>, jmccarty@spd.dsccc.com (Mike McCarty) writes:
- >In article <1996Feb19.063026.29889@zcon.com>,
- >Syed Zaeem Hosain <szh@zcon.com> wrote:
- >
- >)I would have to differ. Dan has always offered *correct* advice when it
- >)is called for. While I do not necessarily always agree with his way of
- >)doing so, his point here is still well taken.
- >
- >This is false. On more than one occasion Dan has posted incorrect
- >information, and when challenged either just silently gone away, or
- >responded with verbal abuse.
-
- Again, I guess I differ. In all the posts I have read from Dan, he has
- been right, albeit not tactful all the time. I believe in reading the
- content and not worrying too much about the phrasing in his posts.
-
- >)When somebody is asking a question about something (that they are
- >)obviously unknowledgable or confused about), giving them incorrect
- >)answers only propagates the confusion. So please don't guess, please
- >)don't offer any incorrect suggestions, please don't confuse them
- >)further, etc.
- >
- >I think that guessing can be very helpful, myself. Especially when a
- >newbie has asked a "fuzzy" question. Then guessing things like
- >
- > I think that you are using an MSDOS machine; if so then...
- >
- > or
- >
- > assuming you meant ... then ...
- >
- >can be very useful. And in any case, where does the charter of this
- >newsgroup state that only bona fide, certified, Dan Pop-a-fied experts
- >are allowed to post responses? This is an UNMODERATED newsgroup.
-
- If the user asks a fuzzy question, then it is perfectly fair to preface
- with the appropriate questions to get more information and provide a
- good answer, but to make incorrect general statements about the
- language only misleads the original query originator.
-
- >)>I may not be an expert but I know if you open a file with fopen(
- >)>"filename", "rt"), then fgets stops reading when it finds a ascii 26 and
- >)>signals end-of-file. If you open it with fopen( "filename","rb") it reads until
- >)>the real end-of-file. I noticed in your smart-ass reply you did not offer any
- >)>answers to his problem. Maybe you should take you own advice.
- >)
- >)On my SunOS system, there is no such ascii 26 byte denoting end of file
- >)and fgets will *not* terminate in this manner. The point is that by
- >)making such incorrect responses (like you did by insisting on this
- >)point) is just plain wrong. It has nothing to do with the language or
- >)how the end of files are denoted in most operating systems. Even in
- >)PC's running MSDOS, there is no such requirement that there *must* be
- >)an ascii 26 at the end of text files. Certain editors (Brief is an
- >)example. microEMacs is another) can easily be configured to create such
- >)ascii files without this byte.
- >
- >His response is not incorrect. It is just incomplete. There is a
- >difference.
-
- Perhaps. But I'd argue that the incompleteness, particular in this
- case, makes it incorrect since it is very misleading. So I prefer to
- call it "incorrect".
-
- >But calling someone an idiot is incorrect.
-
- Here I take objection. I did not call *anyone* an idiot - where in
- my posts do you see that?
-
- >)Note that even the EOF result returned (look in stdio.h) has nothing to
- >)do with the actual byte at the end of the file.
- >
- >Yes, it does, on some systems. This is a very strong statement for you
- >to make, especially in light of the next statement.
-
- Okay, I stand corrected - it was a bit strong. So let me change it
- appropriately: *as far as I know*, on many systems, the EOF result as
- mentioned in stdio.h is -1 (and I will be the first to admit that this
- is not a requirement per se).
-
- But *I* have not seen any system where the actual last byte in files
- *has* to be -1 or, for that matter, the *same* as the value of the
- define of EOF in stdio.h. Can you please provide some examples of
- systems where this is indeed true?
-
- >)The bottom line still is: please do not offer answers if you do not
- >)know the correct answer.
- >
- >Ah, I see. Do as I say, not as I do. Since you offered answers here
- >which are not correct.
-
- Please feel free to provide me with exact corrections - I am always
- willing to listen and learn. But "you are wrong" comments, without
- any further clarification or explanation, does not mean much to me.
-
- >It would be a lot calmer and more fun to read this group if people could
- >treat each other with a normal dose of courtesy.
-
- Certainly. But I'd say that I was a heck of a lot more polite in my
- responses than you, no?
-
- And it would be even more fun if all the posts were discussing the C
- language, so I am going to shut up on this particular thread now. (And
- the crowd roars out their approval! :-))
-
- Z
-
-
- --
- -------------------------------------------------------------------------
- | Syed Zaeem Hosain P. O. Box 610097 (408) 441-7021 |
- | Z Consulting Group San Jose, CA 95161 szh@zcon.com |
- -------------------------------------------------------------------------
-